<script setup>

import {selectData1,selectDataWeb1,saveData1,deleteFun,insertFun,updateFun,getPageRigthDataObj,biaoshi ,tableRef} 
from "../js/InsertDeleteSelectUpdates";
import {selectZhuanMa,selectZhuanMa2} from "@/utils/selectZhuanMaUtils.js";


const fydllist =ref({name: 'VxeSelect',options: []});   
const fyzllist =ref({name: 'VxeSelect',options: []});  
const cwhslist =ref({name: 'VxeSelect',options: []});  
const yzzllist =ref({name: 'VxeSelect',options: []});  
const jyl042list=ref({name: 'VxeSelect',options: []});  
const tlyblist =ref({name: 'VxeSelect',options: []});  
const sbzt001list =ref({name: 'VxeSelect',options: []});  
const lispacslist =ref({name: 'VxeSelect',options: []});  
const mzxgjglist =ref({name: 'VxeSelect',options: []});  
const bblxlist =ref({name: 'VxeSelect',options: []});  
const basyfllist =ref({name: 'VxeSelect',options: []});  
const zxkslist =ref({name: 'VxeSelect',options: []});  
const yhfllist =ref({name: 'VxeSelect',options: []});  
const mzfllist=ref({name: 'VxeSelect',options: []});  
const jcjylist =ref({name: 'VxeSelect',options: []});  
const mzzyylist =ref({name: 'VxeSelect',options: []});  
const wjyynamelist =ref({name: 'VxeSelect',options: []});  

//查询社保局编码转码
const selectweb_xp_fy_fydl=async ()=>{
  const res =await  selectDataWeb1('GetFixCode', { "bh":  'xp_fy_fydl'});
  fydllist.value.options= res.ReContent ;
}

const selectweb_xp_fy_fyzl=async ()=>{
  const res =await  selectDataWeb1('GetFixCode', { "bh":  'xp_fy_fyzl'});
  fyzllist.value.options= res.ReContent ;
}
const selectweb_xp_fy_cwhs=async ()=>{
  const res =await  selectDataWeb1('GetFixCode', { "bh": 'xp_fy_cwhs'});
  cwhslist.value.options= res.ReContent ;
}
const selectweb_xp_yz_yzzl=async ()=>{
  const res =await  selectDataWeb1('GetFixCode', { "bh":  'xp_yz_yzzl'});
  yzzllist.value.options= res.ReContent ;
}
const selectweb_xp_tlyb=async ()=>{
  const res =await  selectDataWeb1('GetFixCode', { "bh": 'xp_tlyb'});
  tlyblist.value.options= res.ReContent ;
}
const selectweb_xp_042=async ()=>{
  const res =await  selectDataWeb1('GetFixCode', { "bh":  'xp_042'});
  jyl042list .value.options= res.ReContent ;
}
const selectweb_xp_001=async ()=>{
  const res =await  selectDataWeb1('GetFixCode', { "bh": 'xp_001'});
  sbzt001list.value.options= res.ReContent ;
}
const selectweb_xp_lis_pacs_jk=async ()=>{
  const res =await  selectDataWeb1('GetFixCode', { "bh":  'xp_lis_pacs_jk'});
  lispacslist .value.options= res.ReContent ;
}
const selectweb_xp_bb_bblx=async ()=>{
  const res =await  selectDataWeb1('GetFixCode', { "bh": 'xp_bb_bblx'});
  bblxlist.value.options= res.ReContent ;
}

//下面xp_008，5个列都用这个字段因为都是是或否，门诊修改价格、是否外检、是否停用、是否显示、是否允许出院
const selectweb_xp_008=async ()=>{
  const res =await  selectDataWeb1('GetFixCode', { "bh":  'xp_008'});
  mzxgjglist.value.options= res.ReContent ;
}
//执行科室
const selectweb_xp_bm_zxks=async ()=>{
  const res =await  selectDataWeb1('GetFixCode', { "bh":  'xp_bm_zxks'});
  zxkslist.value.options= res.ReContent ;
}
//门诊住院用
const selectweb_xp_mzzyy=async ()=>{
  const res =await  selectDataWeb1('GetFixCode', { "bh":  'xp_mzzyy'});
  mzzyylist.value.options= res.ReContent ;
}
//银海医嘱分类
const selectweb_yhfllist=async ()=>{
  const res =await  selectDataWeb1('GetXpmbCode', { "bh":  'yke658'});
  yhfllist.value.options= res.ReContent ;
}
//门诊分类代码
const selectweb_mzfllist=async ()=>{
  const res =await  selectDataWeb1('GetXpmbCode', { "bh":  'yke447'});
  mzfllist.value.options= res.ReContent ;
}
//检验/检查类别代码
const selectweb_jcjylist=async ()=>{
  const res =await  selectDataWeb1('GetXpmbCode', { "bh":  'yke315'});
  jcjylist.value.options= res.ReContent ;
}

const select_basyfllist=async ()=>{
  const res =await selectData1('100004',{},"");
  basyfllist.value.options=selectZhuanMa2(res.ReContent );
}
const select_wjyynamelist=async ()=>{
    const res =await selectData1('100003',{ybid:'2'},"");
 
    wjyynamelist.value.options=selectZhuanMa(res.ReContent );
}

onMounted(()=>{
 
    selectweb_xp_fy_fydl();
    selectweb_xp_fy_fyzl();
    selectweb_xp_fy_cwhs();
    selectweb_xp_yz_yzzl();
    selectweb_xp_tlyb();
    selectweb_xp_042();
    selectweb_xp_001();
    selectweb_xp_lis_pacs_jk();
    selectweb_xp_bb_bblx();
    selectweb_xp_008();
    selectweb_xp_bm_zxks();
    selectweb_xp_mzzyy();
    selectweb_yhfllist();
    selectweb_mzfllist();
    selectweb_jcjylist();
    select_basyfllist();
    select_wjyynamelist();
    
});

const props = defineProps(
    {
        getPageRigthDataObj:{
        type:Object,
        required:true
        }
    }
    
);
const save=()=>{
    emits('saveSon');
}
const emits = defineEmits(['saveSon']);




</script>

<template>
    <div style="height: 100%;width: 100%;">
        <div style="height: calc(100% - 56px);width: 100%;overflow-y: auto;">
            <div class="div20"><div style="background: #359DE1;height: 14px;width: 2px;margin-right: 6px;"></div>基本信息</div>
        <div class="div32" >
            <div class="div32s xpfont">
                <div style="width: 56px;display: flex;align-items: center;margin-right: 8px;">名称全称</div>
                <div style="width: calc(100% - 64px);height: 32px; "><el-input style="width: 100%;" v-model="props.getPageRigthDataObj.mc1"></el-input></div>      
            </div>
        </div>  
        <div class="div32" > 
            <div class="div32s xpfont">
                <div style="width: 56px;display: flex;align-items: center;margin-right: 8px;">费用大类</div>
                <div style="width: 204px;height: 32px; ">
                    <el-select 
                        v-model="props.getPageRigthDataObj.fydl" 
                        clearable
                        placeholder="全部">
                        <el-option 
                        v-for="item in  fydllist.options" 
                        :key="item.value" 
                        :label="item.label"
                        :value="item.value" />
                    </el-select>
                </div>      
            </div>
            <div class="div32s xpfont">
                <div style="width: 56px;display: flex;align-items: center;margin-right: 8px;">费用中类</div>
                <div style="width: 204px;height: 32px; ">
                    <el-select 
                        v-model="props.getPageRigthDataObj.fyzl" 
                        clearable
                        placeholder="全部">
                        <el-option 
                        v-for="item in  fydllist.options" 
                        :key="item.value" 
                        :label="item.label"
                        :value="item.value" />
                    </el-select>
                 </div>      
            </div>
            <div class="div32s xpfont">
                <div style="width: 56px;display: flex;align-items: center;margin-right: 8px;">财务分类</div>
                <div style="width: 204px;height: 32px; ">
                    <el-select 
                        v-model="props.getPageRigthDataObj.fl_cwhs" 
                        clearable
                        placeholder="全部">
                        <el-option 
                        v-for="item in  cwhslist.options" 
                        :key="item.value" 
                        :label="item.label"
                        :value="item.value" />
                    </el-select>
                </div>      
            </div>
        </div> 
        <div class="div32" >
            <div class="div32s xpfont">
                <div style="width: 56px;display: flex;align-items: center;margin-right: 8px;">病案分类</div>
                <div style="width: 204px;height: 32px; ">
                    <el-select 
                        v-model="props.getPageRigthDataObj.xlb_basy" 
                        clearable
                        placeholder="全部">
                        <el-option 
                        v-for="item in  basyfllist.options" 
                        :key="item.value" 
                        :label="item.label"
                        :value="item.value" />
                    </el-select>
                </div>      
            </div>
            <div class="div32s xpfont">
                <div style="width: 56px;display: flex;align-items: center;margin-right: 8px;">执行科室</div>
                <div style="width: 204px;height: 32px; ">
                    <el-select 
                        v-model="props.getPageRigthDataObj.bmbm" 
                        clearable
                        placeholder="全部">
                        <el-option 
                        v-for="item in  zxkslist.options" 
                        :key="item.value" 
                        :label="item.label"
                        :value="item.value" />
                    </el-select>
                </div>      
            </div>
            <div class="div32s xpfont">
                <div style="width: 56px;display: flex;align-items: center;margin-right: 8px;">计量单位</div>
                <div style="width: 204px;height: 32px; "><el-input style="width: 100%;" v-model="props.getPageRigthDataObj.jldw"></el-input></div>      
            </div>
        </div> 
        <div class="div32" >
            <div class="div32s xpfont">
                <div style="width: 56px;display: flex;align-items: center;margin-right: 8px;">费用编号</div>
                <div style="width: 204px;height: 32px; "><el-input style="width: 100%;" v-model="props.getPageRigthDataObj.fybh"></el-input></div>      
            </div>
            <div class="div32s xpfont">
                <div style="width: 56px;display: flex;align-items: center;margin-right: 8px;">单价</div>
                <div style="width: 204px;height: 32px; "><el-input style="width: 100%;" v-model="props.getPageRigthDataObj.rybm"></el-input></div>      
            </div>
            <div class="div32s xpfont">
                <div style="width: 56px;display: flex;align-items: center;margin-right: 8px;">自费价格</div>
                <div style="width: 204px;height: 32px; "><el-input style="width: 100%;" v-model="props.getPageRigthDataObj.name"></el-input></div>      
            </div>
        </div> 
        <div class="div32" >
            <div class="div32s xpfont">
                <div style="width: 56px;display: flex;align-items: center;margin-right: 8px;">打包号码</div>
                <div style="width: 204px;height: 32px; "><el-input style="width: 100%;" v-model="props.getPageRigthDataObj.dbhm"></el-input></div>      
            </div>
            <div class="div32s xpfont">
                <div style="width: 56px;display: flex;align-items: center;margin-right: 8px;">打包金额</div>
                <div style="width: 204px;height: 32px; "><el-input style="width: 100%;" v-model="props.getPageRigthDataObj.outprice"></el-input></div>      
            </div>
            <div class="div32s xpfont">
                <div style="width: 56px;display: flex;align-items: center;margin-right: 8px;">HIS编号</div>
                <div style="width: 204px;height: 32px; "><el-input style="width: 100%;" v-model="props.getPageRigthDataObj.newbh"></el-input></div>      
            </div>
        </div> 
        <div class="div32" >
            <div class="div32s xpfont">
                <div style="width: 56px;display: flex;align-items: center;margin-right: 8px;">医嘱种类</div>
                <div style="width: 204px;height: 32px; ">
                    <el-select 
                        v-model="props.getPageRigthDataObj.yzzl" 
                        clearable
                        placeholder="全部">
                        <el-option 
                        v-for="item in  yzzllist.options" 
                        :key="item.value" 
                        :label="item.label"
                        :value="item.value" />
                    </el-select>
                </div>      
            </div>
            <div class="div32s xpfont">
                <div style="width: 56px;display: flex;align-items: center;margin-right: 8px;">甲乙类</div>
                <div style="width: 204px;height: 32px; ">
                    <el-select 
                        v-model="props.getPageRigthDataObj.bhbh" 
                        clearable
                        placeholder="全部">
                        <el-option 
                        v-for="item in  jyl042list.options" 
                        :key="item.value" 
                        :label="item.label"
                        :value="item.value" />
                    </el-select>
                </div>      
            </div>
            <div class="div32s xpfont">
                <div style="width: 56px;display: flex;align-items: center;margin-right: 8px;">是否停用</div>
                <div style="width: 204px;height: 32px; ">
                    <el-select 
                        v-model="props.getPageRigthDataObj.sfty" 
                        clearable
                        placeholder="全部">
                        <el-option 
                        v-for="item in  mzxgjglist.options" 
                        :key="item.value" 
                        :label="item.label"
                        :value="item.value" />
                    </el-select>
                </div>      
            </div>
        </div> 
        
        <div class="div32" >
            <div class="div32s xpfont">
                <div style="width: 56px;display: flex;align-items: center;margin-right: 8px;">门诊改价</div>
                <div style="width: 204px;height: 32px; ">
                    <el-select 
                        v-model="props.getPageRigthDataObj.sfyxxgjg" 
                        clearable
                        placeholder="全部">
                        <el-option 
                        v-for="item in  mzxgjglist.options" 
                        :key="item.value" 
                        :label="item.label"
                        :value="item.value" />
                    </el-select>
                </div>      
            </div>
            <div class="div32s xpfont">
                <div style="width: 56px;display: flex;align-items: center;margin-right: 8px;">修改人</div>
                <div style="width: 204px;height: 32px; "><el-input style="width: 100%;" v-model="props.getPageRigthDataObj.xgr"></el-input></div>      
            </div>
            <div class="div32s xpfont">
                <div style="width: 56px;display: flex;align-items: center;margin-right: 8px;">修改日期</div>
                <div style="width: 204px;height: 32px; "><el-input style="width: 100%;" v-model="props.getPageRigthDataObj.xgrq"></el-input></div>      
            </div>
        </div> 
        <div class="div52  xpfont" >
            <div class="div52s xpfont">
                <div style="width: 56px;text-align: right;line-height: 56px;margin-right: 8px;">备注</div>
                <div style="width: calc(100% - 64px);height: 56px; "><el-input style="width: 100%;height: 52px; " v-model="props.getPageRigthDataObj.bz"></el-input></div>      
            </div>     
        </div>  
        
        <div class="div20"><div style="background: #359DE1;height: 14px;width: 2px;margin-right: 6px;"></div>其他信息</div>
        <div class="div32" >
            <div class="div32s xpfont">
                <div style="width: 56px;display: flex;align-items: center;margin-right: 8px;">检查类别</div>
                <div style="width: 204px;height: 32px; ">
                    <el-select 
                        v-model="props.getPageRigthDataObj.jcjylist" 
                        clearable
                        placeholder="全部">
                        <el-option 
                        v-for="item in  jcjylist.options" 
                        :key="item.value" 
                        :label="item.label"
                        :value="item.value" />
                    </el-select>
                </div>      
            </div>
            <div class="div32s xpfont">
                <div style="width: 56px;display: flex;align-items: center;margin-right: 8px;">门诊分类</div>
                <div style="width: 204px;height: 32px; ">
                    <el-select 
                        v-model="props.getPageRigthDataObj.mzfllist" 
                        clearable
                        placeholder="全部">
                        <el-option 
                        v-for="item in  mzfllist.options" 
                        :key="item.value" 
                        :label="item.label"
                        :value="item.value" />
                    </el-select>
                </div>      
            </div>
            <div class="div32s xpfont">
                <div style="width: 56px;display: flex;align-items: center;margin-right: 8px;">设备状态</div>
                <div style="width: 204px;height: 32px; ">
                    <el-select 
                        v-model="props.getPageRigthDataObj.sbzt001list" 
                        clearable
                        placeholder="全部">
                        <el-option 
                        v-for="item in  sbzt001list.options" 
                        :key="item.value" 
                        :label="item.label"
                        :value="item.value" />
                    </el-select>
                </div>      
            </div>
        </div>  
        <div class="div32" >
            <div class="div32s xpfont">
                <div style="width: 56px;display: flex;align-items: center;margin-right: 8px;">lis/pacs</div>
                <div style="width: 204px;height: 32px; ">
                    <el-select 
                        v-model="props.getPageRigthDataObj.sfsy" 
                        clearable
                        placeholder="全部">
                        <el-option 
                        v-for="item in  lispacslist.options" 
                        :key="item.value" 
                        :label="item.label"
                        :value="item.value" />
                    </el-select>
                </div>      
            </div>
            <div class="div32s xpfont">
                <div style="width: 56px;display: flex;align-items: center;margin-right: 8px;">标本信息</div>
                <div style="width: 204px;height: 32px; ">
                    <el-select 
                        v-model="props.getPageRigthDataObj.bblx" 
                        clearable
                        placeholder="全部">
                        <el-option 
                        v-for="item in  bblxlist.options" 
                        :key="item.value" 
                        :label="item.label"
                        :value="item.value" />
                    </el-select>
                </div>      
            </div>
            <div class="div32s xpfont">
                <div style="width: 56px;display: flex;align-items: center;margin-right: 8px;">物价编码</div>
                <div style="width: 204px;height: 32px; "><el-input style="width: 100%;" v-model="props.getPageRigthDataObj.wjbm"></el-input></div>      
            </div>
        </div> 
        <div class="div32" >
            <div class="div32s xpfont">
                <div style="width: 56px;display: flex;align-items: center;margin-right: 8px;">国家编码</div>
                <div style="width: 204px;height: 32px; "><el-input style="width: 100%;" v-model="props.getPageRigthDataObj.gjbm"></el-input></div>      
            </div>
            <div class="div32s xpfont">
                <div style="width: 56px;display: flex;align-items: center;margin-right: 8px;">外检标志</div> 
                <div style="width: 204px;height: 32px; ">
                    <el-select 
                        v-model="props.getPageRigthDataObj.wjbz" 
                        clearable
                        placeholder="全部">
                        <el-option 
                        v-for="item in  mzxgjglist.options" 
                        :key="item.value" 
                        :label="item.label"
                        :value="item.value" />
                    </el-select>
                </div>      
            </div>
            <div class="div32s xpfont">
                <div style="width: 56px;display: flex;align-items: center;margin-right: 8px;">外检医院</div>
                <div style="width: 204px;height: 32px; ">
                    <el-select 
                        v-model="props.getPageRigthDataObj.wjyybm" 
                        clearable
                        placeholder="全部">
                        <el-option 
                        v-for="item in  wjyynamelist.options" 
                        :key="item.value" 
                        :label="item.label"
                        :value="item.value" />
                    </el-select>

                </div>      
            </div>
        </div> 
        <div class="div32" >
            <div class="div32s xpfont">
                <div style="width: 56px;display: flex;align-items: center;margin-right: 8px;">开始时间</div>
                <div style="width: 204px;height: 32px; "><el-input style="width: 100%;" v-model="props.getPageRigthDataObj.sxkssj"></el-input></div>      
            </div>
            <div class="div32s xpfont">
                <div style="width: 56px;display: flex;align-items: center;margin-right: 8px;">结束时间</div>
                <div style="width: 204px;height: 32px; "><el-input style="width: 100%;" v-model="props.getPageRigthDataObj.sxjssj"></el-input></div>      
            </div>
            <div class="div32s xpfont">
                <div style="width: 56px;display: flex;align-items: center;margin-right: 8px;">打折比例</div>
                <div style="width: 204px;height: 32px; "><el-input style="width: 100%;" v-model="props.getPageRigthDataObj.mrdzbl"></el-input></div>      
            </div>
        </div> 
        <div class="div32" >
            <div class="div32s xpfont">
                <div style="width: 56px;display: flex;align-items: center;margin-right: 8px;">市医保码</div>
                <div style="width: 204px;height: 32px; "><el-input style="width: 100%;" v-model="props.getPageRigthDataObj.ybcode"></el-input></div>      
            </div>
            <div class="div32s xpfont">
                <div style="width: 56px;display: flex;align-items: center;margin-right: 8px;">省医保码</div>
                <div style="width: 204px;height: 32px; "><el-input style="width: 100%;" v-model="props.getPageRigthDataObj.ybcode_90"></el-input></div>      
            </div>
            <div class="div32s xpfont">
                <div style="width: 56px;display: flex;align-items: center;margin-right: 8px;">物价显示</div>
                <div style="width: 204px;height: 32px; "><el-input style="width: 100%;" v-model="props.getPageRigthDataObj.wj_sfxs"></el-input></div>      
            </div>
        </div> 
        <div class="div32" >
            <div class="div32s xpfont">
                <div style="width: 56px;display: flex;align-items: center;margin-right: 8px;">住院门诊</div>
                <div style="width: 204px;height: 32px; ">
                    <el-select 
                        v-model="props.getPageRigthDataObj.mzzyy" 
                        clearable
                        placeholder="全部">
                        <el-option 
                        v-for="item in  mzzyylist.options" 
                        :key="item.value" 
                        :label="item.label"
                        :value="item.value" />
                    </el-select>
                </div>      
            </div>
            <div class="div32s xpfont">
                <div style="width: 56px;display: flex;align-items: center;margin-right: 8px;">国家医保</div>
                <div style="width: 204px;height: 32px; "><el-input style="width: 100%;" v-model="props.getPageRigthDataObj.gbbm"></el-input></div>      
            </div>
            <div class="div32s xpfont">
                <div style="width: 56px;display: flex;align-items: center;margin-right: 8px;">允许出院</div>
                <div style="width: 204px;height: 32px; ">
                    <el-select 
                        v-model="props.getPageRigthDataObj.sfyxcys" 
                        clearable
                        placeholder="全部">
                        <el-option 
                        v-for="item in  mzxgjglist.options" 
                        :key="item.value" 
                        :label="item.label"
                        :value="item.value" />
                    </el-select>
                </div>      
            </div>
        </div> 
        </div>
        <div style="height: 56px;width: 100%;box-shadow: inset 0px 1px 0px 0px #EBEBEB;padding: 12px;" >
            <el-button type="primary"  style="height: 32px;width: 72px;float: right;">取消</el-button>
            <el-button type="primary"  style="height: 32px;width: 72px;float: right;margin-right: 12px;" @click="save">保存</el-button>
        </div> 
    </div>  
</template>
<style lang="scss"   scoped>
    .div20{
        width: 100%;
        height: 20px;
        margin-bottom: 12px;
        display: flex;
        align-items: center;
        
        // background-color: rgb(97, 114, 172);
    }
    .div32{
        width: 100%;
        height: 32px;
        margin-bottom: 12px;
       // background-color: rgb(216, 220, 234);
        display: flex;
        gap: 12px;
        .div32s{
            display: flex;
            width: 100%;
        }
    }
    .div52{
        width: 100%;
        height: 52px;
        margin-bottom: 12px;
        //background-color: rgb(243, 243, 243);
        display: flex;
        gap: 12px;
        .div52s{
            display: flex;
            width: 100%;
        }

    }
    .xpfont{
        font-family: Microsoft YaHei, Microsoft YaHei;
        font-weight: 400;
        font-size: 14px;
        color: #333333;
        line-height: 20px;
        text-align: right;
        font-style: normal;
        text-transform: none;
    }
</style>